Cryptography device having improved security against side-channel attacks

ABSTRACT

Secure cryptography operations on a white-box cryptography device. Receiving a first message. Receiving a cryptographic key encrypted using a homomorphic encryption scheme. Performing a cryptographic operation, e.g., decryption or digital signature, using the encrypted cryptographic key. Performing a homorphically encrypted tracer calculation that traces the performance of the cryptography operations on the white-box cryptography device thereby allowing verification that all steps of the cryptography operation has been performed without external manipulation. Performing a key-exchange operation. Decrypting the key-exchange output using an alternate cryptographic key stored on the cryptographic device.

BACKGROUND OF THE INVENTION

The present invention generally relates to cryptography devices, andmore particularly to cryptography devices that avoid manipulation ofsecret data, such as keys and random number generator seeds, inplaintext to thereby be more resilient to side-channel attacks includingwhitebox attacks designed to discern such secret data.

Broadly, cryptography provides mechanisms by which a private plaintextmessage may be protected from being divulged by converting the messageinto a ciphertext that may only be deciphered, i.e., converted back intothe plaintext by specific persons or entities that are privy to a secretkey required for performing the deciphering operation.

Two major categories of cryptography are secret key cryptography andprivate-key-public-key cryptography (herein, simply referred to aspublic key cryptography). The former includes the Digital EncryptionStandard (DES) and the Advanced Encryption Standard (AES). The latterincludes Rivest-Shamir-Adelman (RSA).

In secret key cryptography, the encrypting party and the decryptingparty share a secret key (the shared secret key) that is used to bothencrypt and decrypt a message. In public key cryptography, the recipientof a ciphertext message, i.e., the decrypting party, has a private keyor secret key required to decipher ciphertext messages encoded with thepublic key. In other words, there is an association between a particularprivate key and a particular public key; they form a key pair. Thepublic key is made available to anyone who wishes to send an encodedmessage (a ciphertext message) whereas the corresponding secret key iskept secret by the intended recipient of messages.

Public key cryptography also allows creation of digital signatures. Theprivate key is used to sign a message and the public key to verify thesignature.

Traditionally, cryptography relied on a message being turned into aciphertext, that only sender and/or recipient would know the requiredkeys, and that the encryption, decryption, and digital signatureprocesses would not be available for a nefarious person trying todiscern the secret message (or sign the message). Keys were protected bynot giving access to the machines that were used to decrypt/sign a text.The endpoints of a communication are trusted and the communicationchannel between the endpoints is protected by turning messages intociphertext that cannot be decrypted without access to the requireddecryption key. This is referred to as black box cryptography.

However, there are situations where the cryptography device has to bemade available on open devices to a party that not necessarily shouldhave access to the cryptography key. For example, in a digital rightsmanagement (DRM) scenario a publisher may wish to make a DRM protectedwork available to a subscriber. As long as the subscriber satisfies theterms of the subscription, the work is available. However, at the end ofa subscription term, the subscriber should not have access to the work.

The open nature of these systems—whether PCs, tablets, or smartphones—renders the cryptography software extremely vulnerable to attackbecause the attacker has complete control of the execution platform andof the software implementation itself. The attacker can easily analyzethe binary code of the cryptography application and, for example, memorypages used for temporary storage during the execution by interceptingsystem calls, tampering with the binary or execution files. Suchmanipulation may, for example, be performed using debuggers and hardwareemulation tools.

These attacks include trace execution, examination of intermediateresults, and access to keys located in memory as well as the performanceof static analysis on the cryptography software and alteration ofsub-computations for perturbation analysis.

If the work is protected through cryptography, the decryption/signingkey may be provided on the subscriber's cryptography device, e.g., amobile device such as a mobile telephone, in a manner such that the keycan be used by the device to decrypt or to sign the work withoutrevealing either the key or the algorithm to the subscriber. The keymight be hidden in some way inside the code implementing the decryptionor signature algorithm may be obfuscated so that it is very difficult todetermine any information about the value of the key. This scenario isreferred to as white-box cryptography.

White-box cryptography was first described by Chow et al. in [Chow AES]Stanley Chow, et al., White-Box Cryptography and an AES Implementation,in Proceedings of the 9^(th) International Workshop on Selected Areas inCryptography (SAC 2002), volume 2595 of Lecture Notes in ComputerScience, pp. 250-270. Springer, 2002 and in [Chow DES] Stanley Chow, etal., White-Box Cryptography DES Implementation for DRM applications, inProceedings of the ACM Workshop on Security and Digital RightsManagement (DRM 2002), volume 2696 of Lecture Notes in Computer Science,pp. 1-15. Springer, 2002. [Chow AES] and [Chow DES] are bothincorporated herein by reference in their entireties.

However, hitherto, all practical white-box cryptography approaches havebeen broken. Therefore, there is still an unmet need to providecryptography devices that protect cryptographic keys from beingdivulged.

A possible mechanism for protecting encrypted data from being divulgedduring computations made on the data is homomorphic encryption.Homomorphic encryption allows computations to be performed on ciphertextvalues such that computation results when decrypted are the same valuesas if the computations were performed on corresponding plaintext values.

There are several approaches to homomorphic encryption that exhibit thehomomorphic property over one operation. For example, the ElGamalcryptography system ([Elgamal] T. Elgamal, A public key cryptosystem anda signature scheme based on discrete logarithms, IEEE Transactions onInformation Theory (Vol. 31, Issue. 4, July 1985)) is homomorphic overmultiplication. Similarly, the Paillier cryptosystem (Paillier, Pascal“Public-Key Cryptosystems Based on Composite Degree ResiduosityClasses”. EUROCRYPT. Springer. pp. 223-238, 1999) is homomorphic overaddition.

A very powerful, albeit computationally expensive, cryptographymechanism, known as fully homomorphic encryption (FHE), was introducedby Craig Gentry in 2009 in [Gentry] Fully Homomorphic Encryption UsingIdeal Lattices, in Proceedings of the forty-first annual ACM symposiumon Theory of computing (STOC '09), pp. 169-178. ACM, 2009. [Gentry] isincorporated herein by reference in its entirety. Broadly, in FHE,calculations may be performed on encrypted values, with resultsdecrypted, to produce results that are the same as if the calculationhad been performed on corresponding plaintext values. FHE provides forthe application of an arithmetic circuit to a set of ciphertexts whereinthe result is an encrypted value that would be the same as if it hadbeen evaluated on the underlying plaintext. To be considered fullyhomomorphic, the encryption scheme allows for computations usingarbitrary functions and is capable of evaluation of any circuit.

FHE has been suggested for use to encrypt secret key cryptographyalgorithms, notable AES. See, [GHS] Craig Gentry, Shai Halevi, Nigel P.Smart, Homomorphic Evaluation of the AES Circuit, CRYPTO 2012 (a versionmay be found in http://eprint.iacr.org/20121099.pdf (accessed on Dec. 3,2016). In this article, the use case is that a cloud service may compute{M}_(EK) _(FHE) from {K}_(EK) _(FHE) and {C}_(EK) _(FHE) such that C=AES[K](M). The cloud service provider sends {M}_(EK) _(HE) to the client,which may decrypt the message {M}_(EK) _(FHE) using DK_(FHE) to obtainthe plaintext M. EK and DK are encryption key and decryption key,respectively; in the case of shared secret cryptography, EK and DK arethe same whereas for public-key cryptography, EK and DK are,respectively, the public key and private key of the recipient.

Unfortunately, FHE is computationally very expensive and is rarelypractical to use in real-world use cases. A middle-ground are so-calledsomewhat homomorphic encryption systems, which limit the homomorphicproperty to certain calculations beyond a single operation, e.g.,evaluation of low-degree polynomials over ciphertext data.

Homomorphic encryption has been considered for use in white-boxcryptography. See e.g., [Wyseur] White-Box Cryptography, Brecht Wyseur(COSIC) Ph.D. thesis, (2009),http://www.cosic.esat.kuleuven.be/publications/thesis-152.pdf (accessedon Aug. 29, 2016).

However, there are problems associated with use of homomorphicencryption in a white-box environment. In the white-box environment, thehomomorphic decryption is performed by the same entity as the one thatcomputes the homomorphic operations. This access to the algorithm placessome vulnerability on the security of the mechanism.

Other problems associated with deployment of homomorphic encryption inwhite-box cryptography include, first, if the calculation is performedon encrypted data, the encryption result is also encrypted. There needsto be a mechanism for allowing the cryptography device to convertsecurely the result into a plaintext. Second, fundamental to anycryptographic calculation is knowledge that the entire calculation isperformed. For example, for a block cipher such as AES, if all inputs toa cryptographic operation are encrypted, there is no mechanism availableto verify that all rounds of the block cipher and all steps of thoserounds have been performed.

From the foregoing it will be apparent that there is still a need forimproving the security of devices that rely on white-box cryptographyfor performing cryptography operations.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic illustration of a mobile device optionallyconnected over a network to one or more servers from which the mobiledevice may obtain materials which it would perform cryptographicoperations on, for example, for obtaining access to digital rightsmanagement protected content.

FIG. 2 is a schematic illustration of a cryptography device, e.g., amobile device such as a mobile telephone or tablet.

FIG. 3 is a schematic illustration of programs and data stored in amemory of the cryptography device of FIG. 2.

FIG. 4 is a high-level schematic illustration of a mobile device havinga white-box cryptography module program listing that may be stored inthe memory of a cryptography device as illustrated in FIG. 3 and whichperforms a cryptographic operation, e.g., an Advanced EncryptionStandard (AES) decryption, to obtain access to a message obtained from aserver.

FIG. 5 a schematic illustration illustrating the use of homomorphicencryption scheme in a white-box cryptography mechanism in acryptographic device performing a cryptographic operation.

FIG. 6 a schematic illustration providing an embodiment of the mechanismof FIG. 5 in which a cryptographic device performs a key-switchoperation while performing an FHE white box mechanism to perform acryptographic operation.

FIG. 7 is a schematic illustration providing an embodiment for themechanisms of FIG. 5 and FIG. 6 in which the cryptographic device isprovided a tracer vector and tracer verification sum to allowverification of the performance of a cryptographic operation protectedusing the HE white box mechanism.

FIG. 8 is a schematic illustration providing an embodiment for thetracer verification of FIG. 7.

FIG. 9 is a schematic illustration providing a first embodiment of thetracer mechanism of FIG. 7 and FIG. 8, in which the tracer mechanism isencrypted.

FIG. 10 is a schematic illustration providing a second embodiment forthe tracer mechanism of FIG. 7 and FIG. 8, in which the tracer mechanismis encrypted.

FIG. 11 is a flow-diagram illustrating an embodiment in which a securedeterministic random sequence is applied to the second embodiment forapplying a tracer as illustrated in FIG. 10.

FIG. 12 provides additional detail for the mechanism for using anencrypted tracer as discussed hereinabove in conjunction with FIG. 10using a secure deterministic random sequence.

FIG. 13 is a schematic illustration of a white-box HE implementation ofcryptographic digital signature.

DETAILED DESCRIPTION OF THE INVENTION

In the following detailed description, reference is made to theaccompanying drawings that show, by way of illustration, specificembodiments in which the invention may be practiced. These embodimentsare described in sufficient detail to enable those skilled in the art topractice the invention. It is to be understood that the variousembodiments of the invention, although different, are not necessarilymutually exclusive. For example, a particular feature, structure, orcharacteristic described herein in connection with one embodiment may beimplemented within other embodiments without departing from the spiritand scope of the invention. In addition, it is to be understood that thelocation or arrangement of individual elements within each disclosedembodiment may be modified without departing from the spirit and scopeof the invention. The following detailed description is, therefore, notto be taken in a limiting sense, and the scope of the present inventionis defined only by the appended claims, appropriately interpreted, alongwith the full range of equivalents to which the claims are entitled. Inthe drawings, like numerals refer to the same or similar functionalitythroughout the several views.

In an embodiment of the invention, a cryptographic device, e.g., amobile telephone, a tablet, or a personal computer executes a white-boxcryptography mechanism using homomorphic, fully homomorphic, or somewhatfully homomorphic encryption to protect a secret entrusted to thecryptographic device, e.g., a secret key (K) used to encrypt and/ordecrypt or to cryptographically sign, for example, using a block ciphersuch as the Advanced Encryption Standard (AES) algorithm or the RSAalgorithm for signature (RSA is named after it's inventors, Rivest,Shapiro, and Adleman), from attacks intended to discern the protectedsecret.

FIG. 1 is a schematic illustration of a network 111 connecting acryptographic device 103, e.g., a mobile telephone, a tablet, or apersonal computer, to one or more remote servers 113. The cryptographicdevice 103 is operated by a user 101 who interacts with one of theservers 113 via a web browser window 105 of a web browser. In theexample scenario illustrated in FIG. 1, the cryptographic device 103provides the cryptographic operations on behalf of the user 101, e.g.,to decrypt messages, e.g., message C 115, which may correspond to aplaintext message M, and which is received from the remote server 113 a.The messages may be a DRM protected content, such as a computer programor a music library. The message C 115 may also be provided to thecryptographic device 103 to obtain a cryptographic digital signature bythe cryptographic device 103.

While FIG. 1 provides an illustration of one scenario in whichcryptography may play an important role, there are many other importantuses for cryptography. Thus, the technology described herein is notlimited in its application to the usage example illustrated in FIG. 1.

In one embodiment, discussed in conjunction with FIG. 5 a decryptionserver 117 operates to perform a portion of the process of decryptingthe message C 115.

FIG. 2 is a schematic illustration of a cryptography device 103, forexample, a mobile telephone, tablet, or personal computer. Thecryptography device 103 may include a processor 201 connected via a bus202 to a random access memory (RAM) 203, a read-only memory (ROM) 204,and a non-volatile memory (NVM) 205. The cryptography device 103 furtherincludes an input/output interface 207 for connecting the processor 201,again typically via the bus 202, to a connector 211 by which thecryptography device 103 may be connected to an antenna 211 by which thecryptography device 103 may connect to various forms of wirelessnetworks, e.g., wide-area networks, WiFi networks, or mobile telephonynetworks. Alternatively, the cryptography device 103 may connect tonetworks via wired network connections such as Ethernet.

The ROM 204 and/or NVM 205 may include computer programs 301 as isillustrated in FIG. 3. While it is here depicted that the computerprograms 301 are all co-located in the ROM 204 or the NVM 205, in actualpractice there is no such restriction as programs may be spread out overmultiple memories and even temporarily installed in RAM 203.Furthermore, the portable security device 109 may include multiple ROMsor NVMs. The programs 301 include operating system programs 219 as wellas application programs loaded onto the cryptography device 103.

In a preferred embodiment, the programs include a white-box cryptographymechanism 213. While depicted in FIG. 3 as a distinct module 213, inmany implementations a white-box cryptography mechanism may beimplemented as several tables, which, for obfuscation reasons, may bescattered about in the memory 205. Such implementation details areoutside the scope of this document.

The cryptography mechanism 213 of the cryptography device 103,implements one or more cryptography functions (CF) 215, which may be animplementation of a block cipher such as AES, may be implemented asseveral computation blocks (BC) 217.

The ROM 204 or NVM 205 may also contain private data, such as acryptography key 221, stored either in its basic form or as derivedquantities. As noted hereinbelow, in a preferred embodiment, thewhite-box cryptography mechanism executes one or more cryptographyfunctions (CF) 215, which requires a secret key to perform itsoperation. While in many white-box cryptography mechanisms the secretkey is a shared secret key stored on the cryptography device 103, in apreferred embodiment, the secret key that would ordinarily be used todecrypt the message C is not stored on the cryptography device 103 incleartext form; rather, it is received from a server in an encryptedform and undergoes a key-switch operation. The details of the mechanismby which a stored cryptography key 221 is used instead of the secret keyin conjunction with the white-box cryptography mechanism 213 aredescribed in greater detail below.

Thus, the cryptography device 103 may receive a document, a message, oran encrypted program as the encrypted message C 115 via the connector211. The processor 201 may decrypt the document/message using thecryptography key 221 by executing instructions of the cryptographymodule 213 according to the mechanism described hereinbelow.Alternatively, the cryptographic module 213 may provide digitalsignature services, in which case the signs the message using thecryptography key 221.

FIG. 4 is a high-level schematic illustration illustrating a prior artembodiment white-box cryptography mechanism. A service provider 413(analogous to the service provider 113 of FIG. 1) may provide anencrypted message M 415 to the cryptography device 403 (analogous todevice 103 of FIG. 1). The message 415 is encrypted using a secret key K417, e.g., a shared secret known to both the service provider 413 andthe cryptography device 403 or a private key of the cryptographic device403.

A white-box cryptography mechanism 419 executing on the cryptographydevice 403 decrypts the message 415 using the secret key 417 stored onthe cryptography device 403. In a prior art white-box cryptographymechanism 419, the cryptography algorithms may be implemented as a setof tables stored in memory with the secret key 417 hidden within thesetables.

As is discussed hereinbelow, in a preferred embodiment white-boxcryptography mechanism the secret key K is not stored in cleartext onthe cryptography device 103. Rather, secret key K is provided in anencrypted form to the cryptography device 103.

FIG. 5 is a block diagram illustrating data flow of a preferredembodiment white-box cryptography that utilizes homomorphic encrypt(HE), somewhat homomorphic encryption (SHE), or fully homomorphicencryption (FHE) to protect a secret key K 221 (from FIG. 3 andanalogous to the secret key 417 of FIG. 4) from being discerned by anattacker on the cryptography device 103. As SHE and FHE are homomorphicover one operator (as well as providing additional functionality),homomorphic encryption is here used to encompass SHE, FHE, andhomomorphic cryptosystems that are homomorphic at least over oneoperator.

The ElGamal cryptosystem, which is homomorphic over multiplication, isdescribed in [Elgamal], incorporated herein in its entirety. Fullyhomomorphic encryption (FHE) was introduced by Craig Gentry in [Gentry],incorporated herein in its entirety. In the context of describing hissolution for FHE, Gentry also describes somewhat homomorphic encryption(SHE). An FHE, by definition, is a mechanism in which an arbitraryarithmetic circuit may be applied to a ciphertext yielding the sameresult as if the arithmetic circuit had been applied to thecorresponding plaintext. Consider a ciphertext (C) and correspondingplaintext (M), encrypted using FHE, such that:

C={M} _(key) _(FHE)

and an arithmetic circuit AC (parameter), then

decrypt (K_(FHE), AC(C))=AC (M)In other words, performing the arithmetic operations associated with thearithmetic circuit on the plaintext message results in the same resultas if the arithmetic operations are performed on the correspondingciphertext followed by a decryption of the result.

FHE schemes allow computations of arbitrary functions implemented asarithmetic circuits. According to a preferred embodiment, an FHE schemeis used to evaluate a cryptographic function in a white-box environment.In this scheme, illustrated in FIG. 5, consider the following

Definitions

-   -   CF, CF⁻¹—are complementary cryptography functions of a        cryptographic mechanism, e.g., decryption and encryption using a        block cipher such as AES (because the direction of processing is        not material to the discussion herein, for ease of reading, “CF”        is used herein in operations that occur in more places in the        description even if these would typically be denoted CF⁻¹; thus,        the designation CF or CF⁻¹ should not be interpreted to apply        specifically to encryption or decryption, but as generic        inverses of one another).    -   CF (key, message)—application of the cryptography function to        message using key K    -   K—secret key for the cryptography function    -   C—An encrypted message (corresponding to a plaintext message M)        to be processed by the cryptography function    -   SHE—Somewhat homomorphic encryption, e.g., a cryptosystem that        limits the homomorphic property to certain calculations beyond a        single operation, e.g., evaluation of low-degree polynomials        over ciphertext data    -   FHE—Fully homomorphic encryption    -   EK_(HE), DK_(HE)—key pair for homomorphic associated with the        cryptography device 103. In one class of embodiments the        cryptographic scheme is based on a shared secret. In that case,        EK_(HE), DK_(HE) are the same shared secret. In other        embodiments, the cryptography scheme is based on public key        cryptography. In this case, EK_(HE), DK_(HE) are public key and        private key, respectively.    -   encrypt (key, message)—the encryption of message using key        {M}_(key)-Message M encrypted using key, i.e., encrypt (key,        message)→{message}_(key);        -   the form of encryption is implicit from the key, e.g.,            {M}_(EK) _(HE) is an HE encryption of M using the key            EK_(HE).    -   decrypt (key, message)—the decryption of message using key,        i.e., decrypt (key, {M}_(key))→M

FIG. 5 depicts two or three entities: a service provider 113, acryptographic device 103, and, optionally, a decryption server 117 (asdiscussed in greater detail below, certain operations may be performedin one embodiment on the cryptographic device 103 or, in otherembodiments, on a decryption server 117).

The service provider 113 stores the secret key, K, 221 and the publickey for fully homomorphic encryption, EK_(HE), 503. In one embodiment,the corresponding secret key, DK_(HE), 504, is stored on the deviceperforming a decryption of a result from an homomorphic evaluation,described hereinbelow.

The service provider also stores or computes the message, C, 115, whichmay be a message encrypted using cryptographic function CF⁻¹, e.g.,using a block cipher, e.g., AES, using the secret key, K, 221. Thus, inone embodiment C is:

C={M} _(K) =CF(K,M)

The service provider 113 performs a homomorphic encryption on both thesecret key, K, 221, step 505, and the message, C, 115, step 507, therebyproducing the quantities {K}_(EK) _(HE) and {C}_(EK) _(HE) ,respectively. Details of the mathematics of homomorphic encryption areoutside of the scope of this application. However, as noted, HE overmultiplication is described in [Elgamal] and FHE as well as SHE aredescribed in [Gentry], use of FHE in white-box cryptography, in[Wyseur], and, white-box AES implementations, in [GHS], all of which areincorporated herein by reference in their entireties.

The quantities {K}_(EK) _(HE) and {C}_(EK) _(HE) are then transmitted toor loaded on the cryptography device 103, steps 509 and 511,respectively.

On the cryptography device 103, the cryptographic function CF isevaluated under homomorphic encryption, 513. The cryptographic functionCF may be an inverse of the cryptographic function CF⁻¹ performed by theservice provider 113, for example, decryption. Evaluation underhomomorphic encryption 513 entails conversion of the cryptographicfunction CF into an arithmetic circuit 515, which is installed on thecryptography device 103. As an arithmetic circuit compliant with theparticular homomorphic encryption algorithm, computations performed onthe data input thereto conform with the homomorphic encryption propertydescribed hereinabove. Thus, when the arithmetic circuit 515 uses thekey {K}_(EK) _(HE) to evaluate {C}_(EK) _(FHE) , the resulting output is{M}_(EK) _(HE) 517, i.e., the original plaintext message M HE-encryptedusing the key EK_(HE).

A problem with the above-described use of homomorphic encryption in awhite-box environment is that the desired output from the cryptographyfunction, CF(K, C), is encrypted as {M}_(EK) _(HE) . Thus, the resultmust be decrypted, i.e., using the process illustrated here ashomomorphic decryption process 519, which may be performed eitherdirectly on the cryptographic device 103 or, optionally, on thedecryption server 117. Whichever device is performing the homomorphicdecryption stores the homomorphic secret key, DK_(HE), 504, and uses itto decrypt the result from the homomorphic evaluation 513, step 521:

M=decrypt(DK _(HE) ,{M} _(EK) _(HE) )

Furthermore, not illustrated in FIG. 5 the message, C, 115 and thesecret key, K, 221 may require some initial formatting to be compatiblewith a particular homomorphic cryptography algorithm, e.g., padding to aparticular size. For enhanced security, the format, the padding and sizemay be kept secret and would be specific to a particular homomorphiccryptography scheme and may be used, as described hereinbelow, as anadditional verification. The formatting requirement prevents thedecryption of DK_(HE) using DK_(HE).

By performing the cryptographic operation under homomorphic encryptionthe key K is protected because the entire operation is performed onencrypted quantities {K}_(EK) _(HE) and {C}_(EK) _(HE) . Thus, anattacker's attempts to observe intermediate values or any side-channelleakage from the calculations would have no relevance to the actualvalue of K.

In a first alternative embodiment, illustrated in FIG. 6, thecryptography device 103 (or the decryption server 117) performs akey-switch operation while performing an homomorphic cryptographic whitebox mechanism to perform a cryptographic operation. Hereinbelow, thehomomorphic decryption for this and other alternative embodiments isdescribed as if performed entirely on one cryptography device 103.However, the process may be split such that final decryption andverification steps are performed on a separate decryption server 117).

The mechanism illustrated in FIG. 6 avoids storing the secret key 221,K, of the cryptography function in cleartext by performing a key-switchoperation based on the bootstrapping concept of Gentry. Gentry'sbootstrapping concepts allows for the conversion of a ciphertextencrypted using a first public key, EK₁, into a ciphertext that isencrypted using a second public key, EK₂, without decrypting theciphertext. Thus, bootstrapping allows for encrypting the message M witha public key for which the corresponding secret key is not stored on thecryptographic device 103 and to convert the message into a ciphertextthat may be decrypted using a private key that is stored on thecryptographic device 103, but which corresponds to another public key.

More specifically, contrary to the embodiment of FIG. 5 the homomorphiccryptography secret key 504, DK_(HE), is not stored on the cryptographicdevice 103. Rather, an alternate homomorphic cryptography secret key601, DK′_(HE), is stored on the cryptographic device 103. As illustratedin FIG. 5 the service provider 113 transmits the quantities {K}_(EK)_(HE) and {C}_(EKPK) _(HE) , 509 and 511, respectively. Furthermore, inthe embodiment of FIG. 6, the cryptographic device 103 is provided, step602, with the homomorphic cryptography secret key DK_(HE) encryptedusing the alternate homomorphic cryptography public key EK′_(HE)corresponding to the alternate homomorphic cryptography secret key DK HE601 stored on the cryptography device 103, i.e., the cryptography deviceis provided with:

{DK _(HE)}_(EK′) _(HE)

which may be calculated 603 and stored on the service provider 113 or onanother server.

As in FIG. 5, the cryptography device 103 includes the cryptographyfunction CF implemented as an arithmetic circuit 515 which may beexecuted to satisfy the requirements of being homomorphic. Using thearithmetic circuit 515, the cryptography function CF decrypts themessage {C}_(EK) _(HE) , 511 using the key {K}_(EK) _(HE) 509 producing{M}_(EK) _(HE) 517.

Rather than using the secret key, DK_(HE), to decrypt the {M}_(EK) _(He)517, a key-switching operation is performed using the homomorphicbootstrapping technique. The homomorphic encrypted message{M}_(EK) _(HE)517 is decrypted using the received (in step 602) homomorphiccryptography key, {DK_(HE)}_(EK) _(HE) , step 604. Because of thehomomorphic property, wherein the result of a calculation performed onciphertext values produces the same result as if the calculation wereperformed on plaintext values followed by an encryption, the resultingvalue 605 is

{M} _(EK′) _(HE)

i.e., it is a value that is the same as if M had been encrypted usingEK′_(HE) and, consequently, it may be decrypted using the alternatehomomorphic cryptography secret key, DK′_(HE) 601, step 607. As notedabove, the decryption step 607 may be performed by a separate decryptionserver 117 or directly on the cryptography device 103.

Because the decryption of the message, M, 115 is performed using theencrypted secret HE key, DK′_(HE) 601, the secret key, K, is protectedbecause to discern the secret key K an attacker would (1) have torealize that a key switch using bootstrapping is part of the algorithm,(2) must know how to perform such a key-switch operation, and (3) wouldhave to first decrypt DK_(HE) from {DK_(HE)}_(EK) _(HE) 602 and thendecrypt {K}DK_(HE) using DK_(HE).

In one embodiment, the decrypt( ) function is implemented to verify 609the format of the input message. As noted above, in a preliminary step,the message, C, 115 and the key, DK_(HE), 601 may be formatted into asecret format wherein the format and the padding used are kept secret.Correct execution of the evaluation of cryptography function CF underhomomorphic encryption would preserve that format in the input to thedecryption operation 607. The decrypt( ) function may be implemented toverify that its input conforms to the correct format for a message andrefuse operation on any input that does not conform. Thus, the decrypt() function may not be used to decrypt the secret key, DK_(HE), from the{DK_(HE)}_(SK) _(HE) 602 message thereby further protecting thehomomorphic cryptography secret key, DK_(HE).

One issue with the hereinabove-described method of evaluating acryptography operation under homomorphic encryption is verification thatall rounds and steps individual rounds of the block cipher have beenexecuted correctly. An attacker may seek to discern information byinserting faults into a calculation, so-called, fault attack.Introduction of such faults may cause the block cipher to not computeall rounds or steps of individual rounds. Thus, it is desirable todetect whether all rounds and steps have been executed.

In a further embodiment, tracer verification, illustrated in FIG. 7, atracer is introduced to trace the execution of blocks and individualsteps of blocks. A modified cryptography function CF 515′, i.e., amodification to the cryptography function 515 of FIG. 5 and FIG. 6,includes a two-dimensional tracer array t_(ij) wherein the first index icorresponds to a computation block of a cryptography function, e.g., around of a multi-round block cipher, e.g., an AES round, and the secondindex j corresponds to a step executed in that computation block. Acorresponding assigned value array, a_(ij), has pre-assigned values suchthat for each execution of the step i,j (step j of computation block i),the value a_(ij) may be assigned to t_(ij), step 701.

In a preferred embodiment, a_(ij) is a superincreasing sequence, i.e., asequence in which a given element is assigned a value that is greaterthan the sum of all the elements that precede it, e.g., (0 1 2 4 8 16).If a_(ij) is made a superincreasing series, the sum Σ_(i)Σ_(j)a_(ij)allows for the determination of whether any given step i,j has beenexecuted.

A verification sum (A) is also pre-computed in step 701. Theverification sum A is defined such that A=Σ_(i)Σ_(j)a_(ij).

The assigned-value array a and the corresponding verification sum A aretransmitted from the server to the cryptography device 103, Step 703.

FIG. 8 is a flow chart illustrating the steps used in verifying thecomputation using a tracer. It should be noted here, that in preferredembodiments, described in conjunction with Figure Sand FIG. 10 thetracer computation is encrypted using a homomorphic encryptionmechanism.

Steps 701 and 703 are as discussed above.

The array t_(ij) is initialized such that all its elements have thevalue 0, step 801.

The cryptographic function CF is executed under homomorphic encryptionas in FIG. 5 and FIG. 6, step 803, i.e., corresponding to step 515. Foreach step ij (computation block i, step j), the value t_(ij) is set tothe value a_(ij), step 805.

After the entire block cipher has been executed, the sum of all valuest_(ij) is computed, step 807, defining a quantity T, as follows:

$T = {\sum\limits_{i}{\sum\limits_{j}t_{ij}}}$

If all rounds and all steps of all rounds have been executed theverification sum A, received from the server as a verification sum,should equal the sum T of the tracer values. Accordingly, A and T arecompared, step 809. If they are equal, the evaluation of thecryptography function may be accepted, step 811. Otherwise, an error isflagged, step 813.

In preferred embodiments, discussed below as Tracer Method 1 and TracerMethod 2 in conjunction with FIG. 9 and FIG. 10, respectively, one ofthe assigned-value array and the verification sum is encrypted and theother is not encrypted. In Tracer Method 1 (FIG. 9), the assigned-valuearray a_(ij) is encrypted (referred to in its encrypted form as ea,having elements ea_(ij)) and the verification sum (referred to as A) isnot encrypted. In Tracer Method 2 (FIG. 10), the assigned-value array(a, having elements a_(ij)) is not encrypted and, conversely, theverification sum is encrypted (referred to in its encrypted form as EA).In the respective cases, ea_(ij) is a ciphertext corresponding to a_(ij)and EA is a ciphertext corresponding to A.

Generally speaking, the concept of the tracer is to mix the homomorphiccryptography function CF (element 515′) with the evolution of thetracer. At each step of each computation block of the cryptographyfunction CF 515′, the tracer is modified using a homomorphic operation.

Consider that the cryptography function CF 515 consists of n blocks,e.g., rounds in a block cipher, which are indexed by an index i, andeach block i consists of k, steps, which are indexed by an index j,then, a cryptography function CF′ 515′, which is a modification of thecryptography function CF 515 of FIG. 5 and FIG. 6, includes atwo-dimensional tracer array, which is either encrypted or not encryptedand conversely referred to as either et_(ij) or t_(ij), depending onwhether Tracer Method 1 or Tracer Method 2 is used, wherein the firstindex i corresponds to a computation block (e.g., a round of amulti-round block cipher, e.g., an AES round), and the second index jcorresponds to a step executed in that computation block. Thecorresponding assigned-value array, ea_(ij) or a_(ij), has pre-assignedvalues such that for each execution of step i,j (i.e., step j of blocki), the value ea_(ij) is assigned to et_(ij) (Method 1) or the valuea_(ij) is assigned to t_(ij) (Method 2).

In the embodiment referred to herein as Method 1, illustrated in theflowchart of FIG. 9 the server 113 generates the assigned-value arraya_(ij) corresponding to each step j of each round i and then computes anencrypted tracer vector ea_(ij) corresponding to each step j of eachround i. In other words, the tracer vector ea contains k₁+k₂+ . . .+k_(n) elements, where k_(i) is the number of steps in round i. Thevalues ea_(ij) are ciphertext values corresponding to the array elementsa_(ij):

ea _(ij) ={a _(ij)}_(TracerKey)

for i=1 to n and j=1 to k_(n) and TracerKey is a public key (or a sharedsecret key) for the encryption.

Furthermore, in the preliminary step 701, the server 113 computes thesum, A, of the unencrypted tracer values, a_(ij):

A=Σa _(ij)

The values ea_(ij) and A are provided to the cryptography device 103,step 703 (corresponding to step 901 of FIG. 9.

Thus, in a preliminary step, the encrypted assigned-value array ea andthe plaintext verification sum A, are generated and provided to theblock cipher 515′ of the cryptography device 103, step 901,corresponding to the initial steps 701 and 703 of FIG. 7.

Thus, after step 901, for Method 1, the cryptography device 113 has beenprovisioned with:

-   -   {K}_(EK) _(HE)    -   {C}_(EK) _(HE)    -   DK′_(HE)    -   {DK_(HE)}_(EK) _(HE)    -   ea_(ij)={a_(ij)}_(TracerKey) for i=1 to n and j=1 to k_(n)        -   where the TracerKey depends on the encryption method used    -   A=Σa_(ij)

FIG. 9 is a flowchart illustrating Tracer Method 1 for encrypting thetracer verification.

As noted above, the cryptographic device 103 is provisioned with thearray ea_(ij) and the verification sum A, step 901 (corresponding thesteps 701 and 703 of FIG. 7):

$A = {\sum\limits_{i}{\sum\limits_{j}a_{ij}}}$

The array et_(ij) is initialized such that all the elements thereof havethe value 0, step 903.

The cryptography function CF is executed under homomorphic encryption asin FIG. 5 and FIG. 6, step 905, corresponding to step 515′ of FIG. 7.Let's consider the cryptography function CF as being composed of anumber of computation blocks (CB) and each computation block composed ofa number of steps. The computation blocks may, for example, correspondto rounds of a block cipher. For each computation block i, for each stepj of computation block i (round i, step j), the value et_(ij) is set tothe value ea_(ij), step 907:

et _(ij) =ea _(ij)

After all steps of a computation block i have been computed, a tracersum ET_(i) is computed for that round, step 909:

${ET_{i}} = {\sum\limits_{j}{et}_{ij}}$

After the entire cryptography function CF has been executed, i.e., atthe conclusion of the n rounds of the cryptography function CF, thecryptographic device 113 computes a sum of all values for ET_(i), step911, defining a new quantity ET, as follows:

${ET} = {\sum\limits_{i}{ET_{i}}}$

If all rounds and all steps of all computation blocks have been executedA should equal T or, the corresponding encrypted values, EA should equalET. Therefore, EA is computed from A so that EA can later be compared toET, step 913:

EA={A} _(TracerKey)

For EA and ET to be equal, the encryption must be homomorphic. Asdiscussed in greater detail below, that may require that the key used toencrypt the value A be derived from the computation of the value ET andthe key used to encrypt the elements a_(ij). This derivation isdescribed in greater detail below.

Next, EA and ET are compared, step 915.

If the EA and ET values are equal, the tracer computation has verifiedthat all steps of all computation blocks of the cryptographic functionhave been performed correctly; the cryptographic result may be accepted,Step 917.

Otherwise, the EA and ET values not being equal is an indication of anerror condition in the cryptographic function. In that case, an error isflagged, step 919.

In an alternative embodiment, referred to herein as Method 2,illustrated in FIG. 10, the server generates and provides thecryptography device 103 with an assigned-value array a_(ij) as well aswith sum EA of the assigned-value array a_(ij), values encrypted usingthe TracerKey, step 1001; i.e., the converse of Method 1:

${EA} = {\sum\limits_{i}{\sum\limits_{j}\left\{ a_{ij} \right\}_{TracerKey}}}$

Thus, after step 1001 (corresponding to Steps 701 and 703), thecryptography device 113 has been provisioned with:

-   -   {K}_(EK) _(HE)    -   {C}_(EK) _(HE)    -   DK′_(HE)    -   {DK_(HE)}_(EK) _(HE)    -   a_(ij) for i=1 to n and j=1 to k_(n)    -   EA=Σ{a_(ij)}_(TracerKey)

On the cryptography device 103, a tracer array t_(ij) is initialized bysetting each value to 0, step 1003, where i ranges over the number ofcomputation blocks and for each value i, j ranges over the steps thatmake up the computation block i.

The cryptography function is executed under homomorphic encryption, step1005.

Step 1007, for each computation block i, at each step j for computationblock i, the cryptography device 103 assigns:

t _(ij) =a _(ij)

Step 1009, at the conclusion of each computation block i, thecryptography device 103 computes a tracer sum for the computation blocki:

$T_{i} = {\sum\limits_{j = 1}^{k_{i}}t_{ij}}$

and, step 1011, performs the homomorphic encryption operation on thetracer sum T_(i):

ET _(i) ={T _(i)}_(TracerKey)

In a subsequent step (step 1013), ET_(i) is used to produce a sum of thetracer sums for all the computation blocks i, ET, which is compared tothe value EA provisioned by the server in step 1001. To make thatcomparison possible, the homomorphic property must hold. That mayrequire that the TracerKey used to compute ET, be derived from the keysused to compute the encryption of each a_(ij) value. This is discussedin greater detail below.

After computation of n computation block, n FHE ciphertexts ET₁, . . . ,ET_(n) have been computed. The sum of these is computed, step 1013:

${ET} = {\sum\limits_{i = 1}^{n}{ET_{i}}}$

The value ET is tested against the supplied value against theprovisioned value EA, step 1015.

If the values ET and EA are equal, that verifies correct computation ofall steps of the cryptographic operation and the result is accepted,step 1017. Conversely, if they are not equal, a condition of impropercalculation, for example, due to tampering or some form of side-channelattack, is indicated and an error condition is flagged, step 1019.

The tracer calculations of FIG. 9 and FIG. 10 and described hereinaboveas “Method 1” and “Method 2”, respectively, are, for example, deployedprior to the key-switch operation 604 of FIG. 7 If cryptographicoperation 515′ (FIG. 7) is not verified as correct by the tracercomputations, the key-switch operation 604 and subsequent steps are notperformed or similar operations with wrong values are performed. If,however, the tracer verification is correct, the key-switching operation604 is performed.

Above, the tracer methods of FIG. 9 and FIG. 10 are described withoutspecifying the encryption method used; any encryption method with therequisite homomorphic properties may be used. As noted, in both Method 1and Method 2, a summation of the assigned value array a_(ij) isperformed by the server and the corresponding summation of the tracerarray t_(ij) is performed on the cryptography device. However, if thesummation is performed on plaintext quantities on the server, thecorresponding summation is performed using equivalent ciphertexts on thecryptography device, or vice versa. To ensure that the homomorphicproperty to hold, the requisite encryption keys may have to be generatedand updated on the cryptographic device.

The encryption may be a fully homomorphic encryption or a partiallyhomomorphic encryption. An example of the former is FHE scheme accordingto DGHV (M. van Dijk, C. Gentry, S. Halevi, and V. Vaikuntanathan, Fullyhomomorphic encryption over the integers, Advances incryptology—EUROCRYPT 2010, Lecture Notes in Comput. Sci., vol. 6110,Springer, Berlin, 2010, pp. 24-43., hereinafter “DGHV”). An example ofthe latter is ElGamal.

In DGHV, the same key is used to encrypt and to decrypt, i.e.,EK_(Tracer)=DK_(Tracer), denoted here as P_(Tracer). For the encryption,two random values, r′ and q, and the encryption of a value x (having kbits), denoted as ex, is computed as:

ex={x} _(P) _(Tracer) _(,r) =P _(Tracer) q+2^(k) r′+x

-   -   where, r=(r′, q)

As these are FHE ciphertexts, if two ciphertext values, ex₁ and ex₂, areadded, the following holds:

ex ₁ =P _(Tracer) q ₁+2^(k)(r′ ₁)+x ₁

ex ₂ =P _(Tracer) q ₂+2^(k)(r′ ₂)+x ₂

ex ₁ +ex ₂ =P _(Tracer)(q ₁ +q ₂)+2^(k)(r′ ₁ +r′ ₂)+(x ₁ +x ₂)

thus, the r associated with the sum ex₁+ex₂ is:

r=(q ₁ +q ₂ ,r′ ₁ +r′ ₂)=ƒ(r ₁ ,r ₂)

Similarly, if two ciphertext values, ex₁ and ex₂, are multiplied, theproduct is:

ex ₁ *ex ₂ =P _(Tracer) ² *q ₁ q ₂ +P _(Tracer)*(2^(k)(q ₁ r′ ₂ +q ₂ r′₁)+q ₁ x ₂ +q ₂ x ₁)+2^(k)(2^(k) r′ ₁ r′ ₂ +r′ ₁ x ₂ +r′ ₂ x ₁)+x ₁ x ₂

with the associated r value

r=(q ₁ q ₂ p+2^(k)(q ₁ r′ ₂ +q ₂ r′ ₁)+q ₁ x ₂ +q ₂ x ₁,2^(k) r′ _(i) r′₂ +r′ ₁ x ₂ +r′ ₂ x ₁)=ƒ(r ₁ ,r ₂ ,x ₁ x ₂)

i.e., r is a function depending on the random values used and themessages being encrypted.

From which it follows that

encrypt((P _(Tracer) ,r),x ₁ *x ₂)=ex ₁ *ex ₂

In a second example, the ElGamal homomorphic encryption mechanism isused.

In ElGamal, the secret key, DK_(Tracer), and corresponding public key,EK_(Tracer), are not the same. However, they depend on each otherthrough a random value r, as follows:

PK _(Tracer) =g ^(DK) ^(Tracer)

An encryption of a value x:

ex={x} _(EK) _(Tracer) _(,r)=(g ^(r) ,EK _(Tracer) ^(r))

Elgamal is homomorphic over multiplication, as follows:

y ₁ *y ₂ =ex ₁ *ex ₂=(g ^(r) ¹ ^(+r) ² ,(x ₁ *x ₂)*EK _(Tracer) ^(r) ¹^(+r) ² )

In other words, the product y_(i)*y₂=ex₁*ex₂ is an ElGamal encryption ofthe product x₁*x₂ with a value r=r₁+r₂=ƒ(r_(i)+r₂).

From which it follows that:

encrypt((EK _(Tracer) ,r),x ₁ *x ₂)=ex ₁ *ex ₂

Note, the homomorphic encryption operation requires the random valuer_(i), which must be generated in a deterministic way such that r, isrelated to r_(ij) and possibly to a_(ij), depending on the homomorphicalgorithm used.

If the encryption is DGHV, each value ea_(ij) has been encrypted as:

ea_(ij) = {a_(ij)}_(P_(Tracer), r) = P_(Tracer)q + 2^(k)r^(′) + a_(ij)where, r = (r^(′), q)

Thus, since ET is a sum of all the et_(ij) values, the value r,designated R, corresponding to ET is a function of all the r valuescorresponding the et_(ij). Specifically, R corresponding to ET:

$R = {{f\left( {r_{11},\ldots,r_{ij}} \right)} = \left( {{\sum\limits_{i}{\sum\limits_{j}q_{ij}}},\ {\sum\limits_{i}{\sum\limits_{j}r_{ij}}}} \right)}$

And, EA is:

EA={A} _(P) _(Tracer) _(,R)

In the general case, ElGamal is not homomorphic over addition. However,ElGamal is homomorphic over multiplication. Thus, for an embodimentwhere ElGamal is used as the cryptography system for the tracer, tracervalues are multiplied rather than added to produce the check values.

The value R can be precomputed and stored on the cryptography device103. To enhance the security of the mechanism, R may be stored in anobfuscated manner. For example, R may be decomposed into R′ and R″ suchthat R=R′ XOR R″. The values R′ and R″ are stored in lieu of R andwhenever R is required in a computation it is obtained by R=R′ XOR R″.

In both the DGHV and ElGamal cryptosystems, the ciphertext functionincludes random numbers. The encrypted tracer methods describedhereinabove may be viewed as sequential encryption where each sequencemember corresponds to a particular computation block (indexed i) and acomputation step (indexed j) of such a computation block. Each suchencryption has its own unique random number associated therewith, i.e.,a sequence of random numbers. However, so that the encryption on theserver and on the cryptography device correspond to one another, therandom number sequence must correspond. Accordingly, a deterministicrandom sequence produced by a deterministic random generator is used onboth the server and on the cryptography device.

FIG. 11 is a flow-diagram illustrating an embodiment in which adeterministic random sequence is applied to Method 2, illustrated inFIG. 10.

In a first step, a first deterministic pseudo-random sequence r′=r′₁, .. . , r′_(n)) is determined using a seed S′, step 1101, for example,using a Deterministic Random Number Generator, DRNG. One mechanism forsecurely establishing a first deterministic pseudo-random sequence,which may be used here, is described in the patent applicationCryptography Device Having Secure Provision of Random Number Sequencesof the same inventors incorporated herein by reference.

As discussed above, a cryptographic function contains a number ofcomputation blocks m, e.g., rounds of a block cipher, and eachcomputation block contains a number of steps, k₁, where i is the indexfor a particular computation block. Thus, the total number ofcomputation steps is:

$K = {\sum\limits_{i}k_{i}}$

Therefore, a deterministic random sequence r′ is determined for Kelements.

As discussed above, an encrypted tracer array et_(ij), which is anencryption of an assigned value a_(ij) where the encryption uses acorresponding random value r_(ij). While these may be indexed using atwo-dimensional index (computation block i, step j), they may also beviewed as vectors having K elements and indexed using just one index insuch a vector.

Accordingly, corresponding to K (K=Σ_(i) ^(n)k_(i)) computation steps,initialize, step 1103, a vector et_(i) (i.e., (et₁, . . . , et_(a))),such that

et _(i)=encrypt((EK _(Tracer) ,r′ _(i)),0^(k) ^(i) )

-   -   where, k_(i)=number of steps for the computation block i        thereby establishing

et ₁ , . . . ,et _(n)←(encrypt((EK _(Tracer) ,r′ _(i)),0^(k) ^(i) ), . .. ,encrypt((EK _(Tracer) ,r′ _(i)),0^(k) ^(n) ))

Thus, the array et_(i) is initialized with random numbers.

Further, a_(a) is initialized as set forth in conjunction with FIG. 7,step 701, FIG. 8, step 701, and FIG. 10, step 1001 as discussed above.

A second random sequence r_(i)=(r₁, . . . , r_(n)) is determined using aseed Rseed, step 1105; the random sequence r, may be generated using thesecure random sequence generator of the patent application “CryptographyDevice Having Secure Provision of Random Number Sequences” of the sameinventors.

The cryptography function CF is executed under homomorphic encryptionstep 513″, i.e., the cryptographic function has been modified into anarithmetic circuit, which may be executed using homomorphicallyencrypted values and satisfying the homomorphic property. For eachcomputation block i, for each step j of computation block i, et_(ij) isset as follows, step 1107:

et _(ij)=encrypt((EK _(Tracer) ,r _(ij)),a _(ij))

where, r_(ij) is a random value in the random sequence r_(i).Alternatively, the random value for the encryption may be a function ofr_(ij) and the corresponding value a_(ij), i.e., r=ƒ(r_(ij),a_(ij)), inwhich case:

et _(ij)=encrypt((EK _(Tracer) ,r),a _(ij))

where,

r=ƒ(r _(ij) ,a _(ij))

The encrypt function may be either based on a fully homomorphic scheme,e.g., DGHV, or a somewhat homomorphic scheme, e.g., El Gamal, which ishomomorphic over multiplication.

After all steps of a computation block i have been executed, a sum ofall the et_(ij) values for that computation block are summed andrecorded as eT_(i), step 1109:

${eT_{i}} = {\sum\limits_{j}{et}_{ij}}$

After the cryptography function evaluation of 513″, the eT_(i) valuesare summed and recorded as eT, step 1111:

${eT} = {\sum\limits_{i}{eT_{i}}}$

eT (the sum of the encrypted tracer values for all computation blocksand steps) is compared to a sum of encryptions of the values that arenormally assigned to the tracer, namely, a_(ij). These are alsoencrypted using EK_(Tracer)+r_(ij) thereby having the same value as thecorresponding tracer value, step 1113:

${eA} = {\sum\limits_{i}{\sum\limits_{j}{{encrypt}\left( {\left( {{EK_{Tracer}},r_{ij}} \right),a_{ij}} \right)}}}$

Optionally, a second verification value, eA′, may also be computeddirectly from the a_(ij) values, step 1115. First a value R (referred toherein as the summation random value), which is used to encrypt the sumof a_(ij) values, is computed as a function of the sequence r_(i)=(r₁, .. . , r_(n)):

R=ƒ(r ₁ , . . . ,r _(n))

The function ƒ for determining the value of R depends on therelationship of the operations performed and the encryption scheme used.The encrypt function may be either based on a fully homomorphic scheme,e.g., DGHV, or a somewhat homomorphic scheme, e.g., El Gamal, which ishomomorphic over multiplication. For example, as noted above, for DHGV,the sum ex of two ciphertexts ex₁ and ex₂, which are encrypted usingkeys (q₁,r′₁) and (q₂,r′₂), respectively, is encrypted with the key(q₁+q₂,r′₁+r′₂). Thus, in the simple case, if eA is merely the sum oftwo values a_(i1) and a_(i2), the value R would be r′_(i1)+r′_(i2).Generally, R is the sum of all rij values corresponding to the valuesa_(ij) added to form eA.

Because, if the computation has performed all steps, the secondverification value, eA′, is supposed to correspond to eT, which wascomputed in step 1107 and 1109 as a sum of the encrypted a_(ij) values,the function R=ƒ(r₁, . . . , r_(n)) follows the same steps such that:

encrypt((EK _(Tracer) ,R),A)=Σencrypt((EK _(Tracer) ,r _(i)),a _(ij))

A quantity A representing the sum of all a_(ij) values is computed:

$A = {\sum\limits_{i}{\sum\limits_{j}a_{ij}}}$

This value is encrypted using (EK_(Tracer),R) to produce the value eA′:

eA′=encrypt((EK _(Tracer) ,R),A)

Correct execution of the cryptography function CF should have eT, eA,and eA′ equal. These equalities are verified, step 1117. If theverification holds, the block cipher evaluation result is accepted, step1119, otherwise, and an error condition may be raised, step 1121.

There are several possible alternative embodiments, for each of themechanisms described above. For example, the mechanisms described hereinmay be performed entirely under FHE. However, FHE tends to be verycomputationally expensive. Therefore, as described below, for example,some calculations may be performed under a less stringent homomorphicrequirement, i.e., a somewhat homomorphic encryption.

In a first alternative, Option 1, the public key for the encryption ofthe tracer, EK_(Tracer), is the same as the public key for the HE,EK_(FHE), under which the block cipher is evaluated:

EK _(Tracer) =EK _(FHE)

An advantage of this approach is that with the use of the same key forboth tracer computation and cryptography function evaluation, it isdifficult for an attacker to discern which calculation is beingperformed by the cryptography device 103. However, encryption with FHEtends to be very complex and there is no need for FHE for the tracercomputation as only additive homomorphic properties are relied on.

A second alternative, Option 2, a specific key is used to encrypt thetracer, i.e.,

EK _(Tracer) =EK _(FHE)

An advantage is that the secret key, DK_(Tracer), corresponding to thepublic key, EK_(rand), may be provided in some context, e.g., to thedecryption server 117, to allow for determination specific block ciphersteps with errors in the tracer.

Option 2 has three alternatives:

Option 2.1: the encryption scheme is FHE

An advantage of having the encryption scheme as FHE is that it makes itmore difficult for an attacker to distinguish between whether tracercomputation is being performed or whether cryptography functionevaluation is being performed.

However, as noted above, FHE computations are very complex andcomputationally costly, and FHE is unnecessary for the underlyingcomputation.

Option 2.2: the encryption scheme is HE (homomorphic encryption) overone operation. An example is ElGamal encryption, which is homomorphicover multiplication.

An advantage is that HE is much more computationally efficient than FHE.However, use of HE for tracer encryption renders the calculations easierto distinguish by an attacker.

Option 2.3: use a function F that is not homomorphic rather than actualencryption, e.g., simply masking the random with the tracer. Anadvantage of this approach is that it is yet more efficient. However,not using homomorphic encryption will not allow for the three-waycomparison of values in FIG. 11 step 1117 as the calculations in step1115 would not produce a correct value unless homomorphic encryption isused. Therefore, this approach is least secure.

FIG. 12 is a flow-diagram illustrating an alternative embodiment for theapplication of a deterministic random sequence to Method 2, which isillustrated in FIG. 10.

As with the method of FIG. 10, the cryptography device 103 isprovisioned with a_(ij) and EA, step 1201. a_(ij) is set as in step 1001of FIG. 10, step 1202. However, EA is computed as a sum of encrypteda_(ij) values. To do so, a deterministic random sequence r_(i)=(r₁, . .. , r_(n)) is determined using a seed Rseed, step 1203; the randomsequence r, may be generated using the secure random sequence generatorof the patent application, entitled “Cryptography Device Having SecureProvision of Random Number Sequences of the same inventors,”. As above,r, is a sequence of n random values and may also be indexed usingcomputation block index, i, and step index, j.

The value EA is computed as a sum of the a_(ij) values encrypted usingthe random sequence r_(i), step 1204:

${EA} = {\sum\limits_{i}{\sum\limits_{j}\left\{ a_{ij} \right\}_{{EK}_{Tracer},r_{ij}}}}$

On the cryptography device 103, a tracer array t_(ij) having n membersis initialized by setting each member of the array t to 0, step 1205,where i ranges over the number of computation blocks and for each valuei, j ranges over the steps that make up the computation block i. For theinitialization, it is sufficient to simply sequentially initialize nelements of the array t.

The cryptography function CF 515 is executed under homomorphiccryptography, i.e., the block cipher has been modified into anarithmetic circuit, which may be executed using FHE encrypted values andsatisfying being fully homomorphic, step 513′″. For each computationblock i, for each step j of computation block i, t_(ij) is set toa_(ij), step 1207.

For each computation block, the t_(ij) values for that computation blockare summed to produce a value T_(i), step 1209.

For each computation block i, a value ESi, which is an encryption of thesum S_(i), is computed, step 1211. However, a component of theencryption key is a value ri, which is a function of the encryption keysused to encrypt the various a_(ij) values for corresponding tocomputation block i. Thus, first the value ri, to be used in theencryption of T_(i), corresponding to the r_(ij) values used forencrypting the a_(ij) values for each block i in step 1204 is computed,step 1210:

ri=ƒ(r _(i1) , . . . ,r _(ik))

where k is the number of steps for computation block i. As discussedhereinabove in conjunction with FIG. 11, specifically the computation ofthe value R, for an encryption to have the homomorphic property, the keymay need to be recomputed.

For each computation block i, a value ES_(i) is computed as anencryption of the value Si using the value ri, step 1211:

ET _(i) ={T _(i)}_(EK) _(Tracer) _(,ri)

At the conclusion of the execution of the computation function CF underFHE 513′″, the sum of the encrypted sums ET_(i) is computed, step 1213,producing a value ET:

${ET} = {\sum\limits_{i}{ET_{i}}}$

If ET equals the value EA provided in step 1204, the tracer computationhas been verified. Accordingly, ET and EA are compared, step 1215. Ifthe tracer computation has been confirmed, the result of the computationis accepted, step 1217. Otherwise, an error is flagged, step 1219.

In an alternative use, illustrated in FIG. 13, the mechanisms of FIG. 5through FIG. 9 provide a white-box cryptographic digital signature. Amessage m is received by the cryptography device 103 from the serviceprovider 113, Step 1301. Furthermore, the cryptography device 103 alsoreceives an encrypted signing key, {K_(sign)}_(EK) _(HE) , used to signa message, step 1303. As with the encryption key for cryptographicfunction CF described hereinabove, the key K_(sign) is homomorphicallyencrypted, i.e., {K_(sign)}_(EK) _(HE) . The encrypted signing key{K_(sign)}_(EK) _(HE) is provided to the cryptography device 103, step1303.

The message m is formatted to a specified format, e.g., hashed andpadded, step 1305. The resulting quantity is a formatted message M

The formatted message M is combined with an homomorphic ciphertextthereby providing a digital signature of the message, Step 1307. Thehomomorphic ciphertext portion is produced using the encrypted signingkey, {K_(sign)}_(EK) _(HE) . Thus, the result 1309 is also encrypted,{S}_(EK) _(HE) .

As with the cryptography examples described hereinabove, a key changeoperation may be performed, Step 1311, producing a quantity {S}_(EK)_(HE) 1315.

Decryption, to arrive at the signed message, proceeds as describedhereinabove, thereby producing a signed output message M 1317, which,due to the homomorphic property, is the same value as m signed byK_(sign). However, by performing the calculation under homomorphicencryption, the key K_(sign) is not used in plaintext. The tracermechanisms described hereinabove may be employed to secure thecalculation.

From the foregoing, the improvement of the security of a cryptographydevice operating in a white-box environment and storing secret material,for example, the secret key, K, is apparent. This improvement tocryptography devices is provided by enabling the cryptography devices touse fully homomorphic encryption to perform cryptographic calculations,such as block ciphers, in a manner that does not use the key of theblock cipher in a plaintext format. Further, the calculations, whilehidden using homomorphic encryption, may be verified using a tracer,which also may be encrypted.

Although specific embodiments of the invention have been described andillustrated, the invention is not to be limited to the specific forms orarrangements of parts so described and illustrated. The invention islimited only by the claims.

1. A method for securing a white box cryptographic function computationon cryptographic device such that a cryptography key K, used to encrypta plaintext into a ciphertext, is not used in a plaintext form,comprising: receiving a first message ({C}_(PK) _(HE) 511 or m 1303);receiving a message ({K}_(EK) _(HE) ) (509) containing a cryptographykey (K) encrypted using a first homomorphic encryption key (EK_(HE))using a homomorphic encryption scheme, the homomorphic encryption key(EK_(HE)) having a corresponding homomorphic decryption key (DK_(HE));performing a cryptographic operation (515) on the first message (511 or1303) using the encrypted cryptography key ({K}_(EK) _(HE) 509) herebyproducing a cryptography function output ({M}_(EK) _(HE) 517 or {S}_(EK)_(HE) 1309)) encrypted using the first homomorphic encryption key(EK_(HE)); associating each step j of each computation block i of thecryptographic operation with a verification value (ea_(ij), a_(ij)) andverification sum (A,EA) wherein one of the verification sum (EA) is anencryption of the sum of the verification values (a_(ij)) or theverification sum (A) is the sum of plaintext values (a_(ij))corresponding to the verification values (ea_(ij)); using homomorphicencryption, encrypting one of the verification value and theverification sum and not encrypting the other of the verification valueand the verification sum; and for each step j of each round i of thecryptographic function assigning a tracer value (t_(ij),et_(ij)) withthe verification value corresponding to that step i,j; at the conclusionof the cryptographic function, calculating a tracer sum (eT, T) of allthe tracer values; performing one of the calculation of sum of tracervalues (T) or the sum of verification values (A) on encrypted values(et, ea) and performing the other of the calculation of the sum oftracer values or the sum of verification values on plaintext values (t,a); and comparing the calculated tracer sum (T, ET) with the expectedverification sum (A,EA).
 2. The method for securing a cryptographycomputation on cryptographic device such that a cryptography key K isnot used in a plaintext form of claim 1, the method comprising:encrypting the homomorphic decryption key (DK_(HE)) with an alternatehomomorphic encryption key (EK′_(HE)) corresponding to an alternatehomomorphic decryption key (DK′_(HE)) thereby producing an encryptedcryptography key ({DK_(HE)}_(EK′) _(HE) 602) that is used to perform akey-exchange operation for a message encrypted using the homomorphicdecryption key (DK_(HE)) into a message encrypted using the alternatedecryption key (DK′_(HE)); provisioning the cryptographic device withthe alternate decryption key (DK′_(HE)) (601); performing a key-exchangeoperation to cause the cryptographic function output to be encryptedusing a the alternate homomorphic encryption key (EK′_(HE))corresponding to the alternate homomorphic decryption key (DK′_(HE)) bydecrypting the cryptographic function output ({M}_(EK) _(HE) ) therebyproducing a key-exchanged cryptographic function output ({M}_(EK) _(HE)605, {S}_(EK) _(HE) 513′); decrypting the key-exchanged cryptographicfunction output using the alternate decryption key (DKey′_(HE)) therebyproducing a cryptography output message corresponding to the firstmessage wherein the cryptography output message has a value equivalentof the cryptography operation performed on the first message using thecryptography key (K) without using the cryptography key (K) in plaintexton the cryptographic device.
 3. The method for securing a white boxcryptographic function computation on cryptographic device such that acryptographic key K is not used in a plaintext form of claim 2, furthercomprising: determining a first random sequence (r_(i), 1105); settingeach tracer value to the corresponding verification value encryptedusing a key that includes random number values from the first randomsequence (1107); computing a summation random value (R, 1115) that is afunction of the random values used to encrypt the tracer values; andencrypting the verification sum (eA′) with a key that includes thesummation random value (1115).
 4. The method for securing a white boxblock cipher computation on cryptographic device such that acryptographic key K is not used in a plaintext form of claim 3 furthercomprising: computing a summation (eA) of the encrypted verificationvalues encrypted using the key that includes random number values fromthe first random sequence (1113); verifying the tracer computation basedon a comparison of the summation of the encrypted verification valuesand the encrypted verification sum and the tracer sum.
 5. The method forsecuring a cryptography computation on cryptographic device such that acryptography key K is not used in a plaintext form of claim 1, furthercomprising: determining (1203) a pseudorandom sequence (r) based on aseed (R) such that an element of the pseudorandom sequence is associatedwith an element of the verification values; provisioning (1201) thecryptographic device with an array of verification values (a_(ij)),wherein a verification value (a_(ij)) is associated with each step (j)of each computation block (i) of a cryptographic function, and anencrypted verification sum (EA) computed (1204) by encrypting eachverification value associated with each step of each computation block(a_(ij)) using a tracer key (EK_(Tracer)) and the corresponding randomvalue from the pseudorandom sequence, and adding the encryptedverification values into an encrypted verification sum (EA); wherein thestep of performing a cryptographic operation (513′″) further comprises:determining a tracer value (T_(i)) indicative of computation of allsteps of each computation block; determining a summation random value(ri) corresponding to the random values (r_(ij)); and encrypting (1211)a tracer value (ET_(i)) using the tracerkey (EK_(Tracer)) and thesummation random value (ri); and comparing a summation of the tracervalues (ET) with the encrypted verification sum (EA) and taking acorrective action of the summation of the tracer values is not equal tothe encrypted verification sum.
 6. The method for securing a white boxblock cipher computation on cryptographic device such that acryptographic key K is not used in a plaintext form of claim 2, whereinthe first message is formatted according to a predetermined secretformat and wherein the decrypting of the key-exchanged block cipheroutput step further comprising verifying that the message corresponds tothe predetermined secret format before performing decryption stepthereby preventing encrypted keys from being decrypted.
 7. The methodfor securing a white box block cipher computation on cryptographicdevice such that a cryptographic key K is not used in a plaintext formof claim 2, wherein the first message ({C}_(EK) _(HE) 511) is aciphertext message to be decrypted and the cryptographic operation (515)on the first message (511) using the encrypted cryptography key (511) isa cryptographic decryption operation, the cryptography function output({M}_(EK) _(HE) 517) is an encryption of the plaintext message Mencrypted using the first homomorphic public key (EK_(HE)), wherein thekey-exchange operation causes the cryptographic function output({M}_(EK) _(HE) ) to be encrypted using a second homomorphic key(EK_(HE)) thereby producing a key-exchanged cryptographic functionoutput ({M}_(EK′) _(HE) ) (513′) that is a the plaintext message (M)encrypted using the second homomorphic key; and wherein decrypting thekey-exchanged cryptographic function output message produces the messageM that is a plaintext message that has a value equivalent of acryptographic decryption operation performed on the first message usingthe cryptography key (K) without using the cryptography key (K) inplaintext on the cryptographic device.
 8. The method for securing awhite box block cipher computation on cryptographic device such that acryptographic key K is not used in a plaintext form of claim 2, whereinthe first message (m (1301)) is a message to be cryptographically signedand the cryptographic operation (1307) on the first message (1301) usingthe encrypted cryptography key (1303) is a cryptographic signatureoperation, the cryptography function output ({S}_(EK) _(HE) ) (1309) isan encryption of the plaintext message S encrypted using the firsthomomorphic public key (EK_(HE)), wherein the key-exchange operationcauses the cryptographic function output ({S}_(EK) _(HE) ) to beencrypted using a second homomorphic key (EK′_(HE)) thereby producing akey-exchanged cryptographic function output ({S}_(EK′) _(HE) ) (513′)that is a cryptographic signature encrypted using the second homomorphickey; and wherein decrypting the key-exchanged cryptographic functionoutput message produces the message M that is a cryptographically signedoutput message that has a value equivalent of a cryptographic signatureoperation performed on the first message using the cryptography key (K)without using the cryptography key (K) in plaintext on the cryptographicdevice.
 9. A cryptographic device having a secured white boxcryptographic function computation whereby a cryptography key K, used toencrypt a plaintext into a ciphertext, is not used in a plaintext form,the cryptographic device operable to: receive a first message ({C}_(PK)_(HE) 511 or m 1303); receive a message ({K}_(EK) _(HE) ) (509)containing a cryptography key (K) encrypted using the first homomorphicencryption key (EK_(HE)) using a homomorphic encryption scheme; performa cryptographic operation (515) on the first message (511 or 1303) usingthe encrypted cryptography key ({K}_(EK) _(HE) 509) thereby producing acryptography function output ({M}_(EK) _(HE) 517 or {S}_(EK) _(HE)1309)) encrypted using the first homomorphic encryption key (EK_(HE));associate each step j of each computation block i of the cryptographicoperation with a verification value (ea_(ij), a_(ij)) and verificationsum (A,EA) wherein one of the verification sum (EA) is an encryption ofthe sum of the verification values (a_(ij)) or the verification sum (A)is the sum of plaintext values (a_(ij)) corresponding to theverification values (ea_(ij)); use homomorphic encryption, to encryptone of the verification value and the verification sum and notencrypting the other of the verification value and the verification sum;and for each step j of each round i of the cryptographic function,assign a tracer value (t_(ij),et_(ij)) with the verification valuecorresponding to that step i,j; at the conclusion of the cryptographicfunction, calculate a tracer sum (eT, of all the tracer values; performone of the calculation of sum of tracer values (T) or the sum ofverification values (A) on encrypted values (et, ea) and performing theother of the calculation of the sum of tracer values or the sum ofverification values on plaintext values (t, a); and compare thecalculated tracer sum (T, ET) with the expected verification sum (A,EA).10. (canceled)
 11. The cryptographic device having a secured white boxcryptographic function computation whereby a cryptography key K is notused in a plaintext form of claim 9, the cryptographic devicecomprising: an alternate decryption key (DK′_(HE)) (601) correspondingto an alternate homomorphic encryption key (EK′_(HE)); the cryptographicdevice operable to: receive an encrypted cryptography key({DK_(HE)}_(EK) _(HE) 602) that is used to perform a key-exchangeoperation for a message encrypted using the homomorphic decryption key(DK_(HE)) into a message encrypted using the alternate decryption key(DK′_(HE)), the encrypted cryptography key ({DK_(HE)}_(EK′) _(HE) 602)being an encryption of the homomorphic decryption key (DK_(HE)) usingthe alternate encryption key (EK′_(HE)); perform a key-exchangeoperation to cause the cryptographic function output to be encryptedusing the alternate homomorphic encryption key (EK′_(HE)) correspondingto the alternate homomorphic decryption key (DK′_(HE)) by decrypting thecryptographic function output ({M}_(EK) _(HE) ) thereby producing akey-exchanged cryptographic function output ({M}_(EK) _(HE) 605,{S}_(EK′) _(HE) 513′); decrypt the key-exchanged cryptographic functionoutput using the alternate decryption key (DKey′_(HE)) thereby producinga cryptography output message corresponding to the first message whereinthe cryptography output message has a value equivalent of thecryptography operation performed on the first message using thecryptography key (K) without using the cryptography key (K) in plaintexton the cryptographic device.
 12. The cryptographic device having asecured white box cryptographic function computation whereby acryptography key K is not used in a plaintext form of claim 11, furtheroperable to: determine a first random sequence (r_(i), 1105); set eachtracer value to the corresponding verification value encrypted using akey that includes random number values from the first random sequence(1107); compute a summation random value (R, 1115) that is a function ofthe random values used to encrypt the tracer values; and encrypt theverification sum (eA′) with a key that includes the summation randomvalue (1115).
 13. The cryptographic device having a secured white boxcryptographic function computation whereby a cryptography key K is notused in a plaintext form of claim 12, further operable to: compute asummation (eA) of the encrypted verification values encrypted using thekey that includes random number values from the first random sequence(1113); verify the tracer computation based on a comparison of thesummation of the encrypted verification values and the encryptedverification sum and the tracer sum.
 14. The cryptographic device havinga secured white box cryptographic function computation whereby acryptography key K is not used in a plaintext form of claim 9, furtheroperable to: determine (1203) a pseudorandom sequence (r) based on aseed (R) such that an element of the pseudorandom sequence is associatedwith an element of the verification values; provision (1201) thecryptographic device with an array of verification values (a_(ij)),wherein a verification value (a_(ij)) is associated with each step (j)of each computation block (i) of a cryptographic function, and anencrypted verification sum (EA) computed (1204) by encrypting eachverification value associated with each step of each computation block(a_(ij)) using a tracer key (EK_(Tracer)) and the corresponding randomvalue from the pseudorandom sequence, and adding the encryptedverification values into an encrypted verification sum (EA); wherein toperform said a cryptographic operation (513′″) the cryptographic deviceis operable to: determine a tracer value (T_(i)) indicative ofcomputation of all steps of each computation block; determine asummation random value (ri) corresponding to the random values (r_(ij));and encrypt (1211) a tracer value (ET_(i)) using the tracerkey(EK_(Tracer)) and the summation random value (ri); and compare asummation of the tracer values (ET) with the encrypted verification sum(EA) and taking a corrective action of the summation of the tracervalues is not equal to the encrypted verification sum.
 15. Thecryptographic device having a secured white box cryptographic functioncomputation whereby a cryptography key K is not used in a plaintext formof claim 11, wherein the first message is formatted according to apredetermined secret format and wherein the decrypting of thekey-exchanged block cipher output step further comprising verifying thatthe message corresponds to the predetermined secret format beforeperforming decryption step thereby preventing encrypted keys from beingdecrypted.
 16. The cryptographic device having a secured white boxcryptographic function computation whereby a cryptography key K is notused in a plaintext form of claim 11, wherein the first message({C}_(EK) _(HE) 511) is a ciphertext message to be decrypted and thecryptographic operation (515) on the first message (511) using theencrypted cryptography key (511) is a cryptographic decryptionoperation, the cryptography function output ({M}_(EK) _(HE) 517) is anencryption of the plaintext message M encrypted using the firsthomomorphic public key (EK_(HE)), wherein the key-exchange operationcauses the cryptographic function output ({M}_(EK) _(HE) ) to beencrypted using a second homomorphic key (EK′_(HE)) thereby producing akey-exchanged cryptographic function output (EK′_(HE)) (513′) that is athe plaintext message (M) encrypted using the second homomorphic key;and wherein decrypting the key-exchanged cryptographic function outputmessage produces the message M that is a plaintext message that has avalue equivalent of a cryptographic decryption operation performed onthe first message using the cryptography key (K) without using thecryptography key (K) in plaintext on the cryptographic device.
 17. Thecryptographic device having a secured white box cryptographic functioncomputation whereby a cryptography key K is not used in a plaintext formof claim 11, wherein the first message (m (1301)) is a message to becryptographically signed and the cryptographic operation (1307) on thefirst message (1301) using the encrypted cryptography key (1303) is acryptographic signature operation, the cryptography function output({S}_(EK) _(HE) ) (1309) is an encryption of the plaintext message Sencrypted using the first homomorphic public key (EK_(HE)), wherein thekey-exchange operation causes the cryptographic function output({S}_(EK) _(HE) ) to be encrypted using a second homomorphic key(EK′_(HE)) thereby producing a key-exchanged cryptographic functionoutput ({S}_(EK′HE)) (513′) that is a cryptographic signature encryptedusing the second homomorphic key; and wherein decrypting thekey-exchanged cryptographic function output message produces the messageM that is a cryptographically signed output message that has a valueequivalent of a cryptographic signature operation performed on the firstmessage using the cryptography key (K) without using the cryptographykey (K) in plaintext on the cryptographic device.